package com.swxc.smartorder.entity

import com.google.gson.annotations.SerializedName

/**
 * Author   Administrator
 * Date     2018/3/30
 * Desc     eg
 */
data class CommonData<T>(
        @SerializedName("data") val data: T,
        @SerializedName("message") val message: String,
        @SerializedName("responseCode") val responseCode: Int,
        @SerializedName("success") val success: Boolean
)

/**
 * 返回为分页
 */
data class CommonListData<L>(
        @SerializedName("elements") val elements: List<L>,
        @SerializedName("page") val page: Int,
        @SerializedName("size") val size: Int,
        @SerializedName("totalAmount") val totalAmount: Int,
        @SerializedName("totalPages") val totalPages: Int
)


data class BackEntity(
        @SerializedName("message") val message: String,
        @SerializedName("responseCode") val responseCode: Int,
        @SerializedName("success") val success: Boolean
)


/**
 * 返回为列表
 */
data class CommonDataList<E>(
        @SerializedName("data") val data: List<E>,
        @SerializedName("message") val message: String,
        @SerializedName("responseCode") val responseCode: Int,
        @SerializedName("success") val success: Boolean
)

